package interview

/**
Given a 1-d sort.getArray candy crush, return the shortest sort.getArray after removing all the continuous same numbers (the repeating number >= 3)
input: 1-d sort.getArray [1, 3, 3, 3, 2, 2, 2, 3, 1]
return: [1, 1]
Time complexity should be better than O(n^2)
 */
fun main(args: Array<String>) {

    //移除所有连续出现过的数字
    val numberSet = hashSetOf<Int>()

    var nums = intArrayOf(1, 3, 3, 3, 2, 2, 2, 3, 1)

    var currNumber = nums[0]

    var result = ArrayList<Int>()
    for (i in 1 until nums.size - 1){

    }

}

